projects
/
project
/
procd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3283d68
)
bugfix of error handling while open()
author
Thomas Huehn
<
[email protected]
>
Fri, 5 Jul 2013 10:04:14 +0000
(12:04 +0200)
committer
John Crispin
<
[email protected]
>
Mon, 8 Jul 2013 09:00:36 +0000
(11:00 +0200)
The normal return value from open() is a non-negative integer.
In the case of an error, a value of -1 is returned instead.
Signed-off-by: Thomas Huehn <
[email protected]
>
debug.c
patch
|
blob
|
history
inittab.c
patch
|
blob
|
history
diff --git
a/debug.c
b/debug.c
index 7d7798b9be6c5910c1e9a446e5c2472cc340e9c9..91e874f6a3ae54d4b7e5857725f786af9a5c3003 100644
(file)
--- a/
debug.c
+++ b/
debug.c
@@
-29,7
+29,7
@@
void debug_init(void)
regex_t pat_cmdline;
regmatch_t matches[2];
- if (
!fd
)
+ if (
fd < 0
)
return;
r = read(fd, line, sizeof(line) - 1);
diff --git
a/inittab.c
b/inittab.c
index 686d3891655fc01c7314b07083482abf06fb60e9..d73e0b87758a21a4153c00ce3c839b40f84bda9b 100644
(file)
--- a/
inittab.c
+++ b/
inittab.c
@@
-139,7
+139,7
@@
static void askconsole(struct init_action *a)
regex_t pat_cmdline;
regmatch_t matches[2];
- if (
!fd
)
+ if (
fd < 0
)
return;
r = read(fd, line, sizeof(line) - 1);